package com.patrol.logisticsmanage.ui.equip;


import android.os.Bundle;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.viewpager.widget.ViewPager;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.google.android.material.tabs.TabLayout;
import com.patrol.logisticsmanage.R;
import com.patrol.logisticsmanage.R2;
import com.patrol.logisticsmanage.ui.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

@Route(path = "/app/equip")
public class EequipActivity extends BaseActivity {

    @BindView(R.id.tv_title)
    TextView tvTitle;
//    @BindView(R.id.tab_layout)
//    TabLayout mTabLayout;
//    @BindView(R.id.viewpager)
//    ViewPager mViewPager;

    private PagerAdapter mPagerAdapter;
    private String[] titles = {"个人信息","领取记录"};
    private List<Fragment> fragments;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_equip);
        ButterKnife.bind(this);

        tvTitle.setText("身材数据填报");

        initViewPagerFragment();

    }

    private void initViewPagerFragment() {
//        mPagerAdapter = new PagerAdapter(getSupportFragmentManager());
//        fragments = new ArrayList<>();
//        for (int i = 0; i < titles.length; i++) {
//            fragments.add(FragmentFactory.createFragment(i));
//        }
//        mPagerAdapter.setTitles(titles);
//        mPagerAdapter.setFragments(fragments);
//        mViewPager.setAdapter(mPagerAdapter);
//        //将TabLayout和ViewPager绑定
//        mTabLayout.setupWithViewPager(mViewPager);
//        mTabLayout.setTabMode(TabLayout.MODE_FIXED);
        //mTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);

    }
}
